<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['系统配置','数据审核']" icon="fa fa-cog" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>数据审核</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left" style="padding-left: 0;vertical-align: middle;margin:5px 12px 5px 0;height: 28px;">
								<label class="control-label" style="vertical-align:top;height: 28px;margin: 0;line-height: 28px;min-width:66px;text-align:center;background-color: #ccc;border-radius: 4px 0 0 4px;">时间
								</label><div class="" style="padding: 0;display: inline-block;border: 1px solid #ccc;border-radius: 0 4px 4px 0;overflow: hidden;border-left: none;">
									<input type="text" class="form-control" style="height: 26px;width: 180px;border:none;" [(ngModel)]='auditingTime' id="auditingTime" autocomplete="off"/>
								</div>
							</div>
							<div class="left page-header-btn">
							
								<button  type="button"  class="btn btn-primary" (click)="operationAll('update')">全部更新</button>
								<button  type="button"  class="btn btn-primary" (click)="operationAll('start')">全部启用</button>
								<button  type="button"  class="btn btn-primary" (click)="operationAll('stop')">全部取消</button>
							</div>
							<div class="right top-search">
								<input type="text" [(ngModel)]="searchKey" (change)="table_search(searchKey)" class="search-input" placeholder="设备ID、车牌号...">
								<span class="top-search-box">
							        <button class="top-search-btn" type="button" (click)="table_search(searchKey)"> <i class="fa fa-search"></i></button>
							    </span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>设备ID</th>
										<th>车牌号码</th>
										<th>审核状态</th>
										<th>审核人员</th>
										<th>审核时间</th>
										<th>时间提示(未审核)</th>
										<th>未审核条数</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" >
										<td>{{row.deviceId}}</td>
										<td>{{row.carNumber}}</td>
										<td>
											<span  *ngIf="!row.review" class="red">未审核</span>
					            			<span  *ngIf="row.review" class="green">已审核</span>
										</td>
										<td>{{row.userName}}</td>
										<td>{{row.uploadDate}}</td>
										<td>
											<span  *ngIf="row.spaceTime === 0">无</span>
					            			<span  *ngIf="row.spaceTime !== 0" class="red">{{row.spaceTime}}</span>
										</td>
										<td>{{row.noReviewNumber}}</td>
										<td>
										  	<button  type="button" (click)="del_audit(row)">删除</button>
											<button  type="button" (click)='updateStatus(row,"update")'>更新</button>
								            <button  type="button" *ngIf="row.review" (click)='updateStatus(row,"stop")'>取消</button>
								            <button  type="button" *ngIf="!row.review" (click)='updateStatus(row,"start")'>启用</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount"
						           [rows]="pageSize"
						           [currentPage]="curPage - 1"
						           (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>	
</div>
